package net.m510.autosurfer.core.process;

import java.io.IOException;

import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.impl.client.CloseableHttpClient;
import org.jsoup.nodes.Document;

public abstract class AbstractSurfProcess<T> implements SurfProcess<T> {
	public static final String DEFAULT_CHARSET = "UTF-8";
	protected CloseableHttpClient client;
	protected HttpClientContext context;
	protected String defaultCharset = DEFAULT_CHARSET;
	
	public AbstractSurfProcess() {
		super();
	}
	public AbstractSurfProcess(CloseableHttpClient client, HttpClientContext context) {
		super();
		this.client = client;
		this.context = context;
	}
	
	public abstract T process(Document doc) throws IOException;
	
	@Override
	public void setHttpClient(CloseableHttpClient client) {
		this.client = client;
	}

	@Override
	public void setHttpClientContext(HttpClientContext context) {
		this.context = context;
	}
}
